import { lazy } from "react";
import { createBrowserRouter } from 'react-router-dom'

const Home = lazy(() => import('../parge/Home/Home'))
const Order = lazy(() => import(('../parge/Order/Order')))
const Detail = lazy(() => import('../parge/Detail/Detail'))
const OrderList = lazy(() => import('../parge/OrderList/OrderList'))
const ToOrder = lazy(() => import('../parge/ToOrder/ToOrder'))


const router = createBrowserRouter([
    {
        path: '/',
        element: <Home></Home>
    },
    {
        path: '/order',
        element: <Order></Order>
    },
    {
        path: '/detail',
        element: <Detail></Detail>
    },
    {
        path: '/orderlist',
        element: <OrderList></OrderList>
    },
    {
        path: '/toorder',
        element: <ToOrder></ToOrder>
    }
])

export default router